Skip to content

DRAFT: ratls: drop self-referential init_policy_hash cert extension#883

Draft
sgrams wants to merge 1 commit into
intel:mainfrom
sgrams:t2-drop-init-policy-hash-cross-check
Draft

DRAFT: ratls: drop self-referential init_policy_hash cert extension#883
sgrams wants to merge 1 commit into
intel:mainfrom
sgrams:t2-drop-init-policy-hash-cross-check

Conversation

@sgrams

@sgrams sgrams commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The rebinding-old RA-TLS cert carried two extensions populated from the same peer's initial TDINFO:

  • EXTNID_MIGTD_TDREPORT_INIT (OID ...1.7) — full TDINFO_STRUCT
  • EXTNID_MIGTD_INIT_POLICY_HASH (OID ...1.9) — mrowner (TDINFO[112..160])

verify_rebinding_old_cert then compared the second against bytes 112..160 of the first — i.e. the peer attesting to itself. A malicious peer chooses both halves freely, so the check has no security value.

Change

Mirror commit ff049f7 (which removed the equivalent check from the SPDM rebind path) on the RA-TLS path:

  • drop EXTNID_MIGTD_INIT_POLICY_HASH from create_certificate_for_rebinding_old
  • drop the find_extension + byte-compare from verify_rebinding_old_cert
  • drop the init_policy_hash parameter from client_rebinding and rebinding_old_prepare
  • remove the now-unused OID constant from ratls/mod.rs

The peer's TDINFO_STRUCT continues to be carried in EXTNID_MIGTD_TDREPORT_INIT and consumed by mig_policy::authenticate_rebinding_old.

Test

cargo check -p migtd --no-default-features \
  --features main,stack-guard,spdm_attestation,virtio-vsock,policy_v2,test_disable_ra_and_accept_all \
  --target x86_64-unknown-none
cargo check -p migtd --no-default-features \
  --features main,stack-guard,virtio-vsock,policy_v2,test_disable_ra_and_accept_all \
  --target x86_64-unknown-none

Both feature sets build cleanly (no new warnings).

Note

Anti-downgrade binding of the locally-loaded INIT data against the local MigTD's own TDINFO (verify_init_migtd_data_policy_binding) belongs in start_rebinding and is tracked separately.

The rebinding-old RA-TLS cert carried two extensions populated from the
same peer's initial TDINFO:

  * EXTNID_MIGTD_TDREPORT_INIT (OID .1.7) - full TDINFO_STRUCT
  * EXTNID_MIGTD_INIT_POLICY_HASH (OID .1.9) - mrowner (TDINFO[112..160])

verify_rebinding_old_cert then compared the second against bytes 112..160
of the first, i.e. the peer attesting to itself. The check has no
security value: a malicious peer chooses both halves freely.

Mirror commit ff049f7 (which removed the equivalent check from the SPDM
rebind path) on the RA-TLS path:

  * drop the EXTNID_MIGTD_INIT_POLICY_HASH cert extension from
    create_certificate_for_rebinding_old
  * drop the find_extension + byte compare from verify_rebinding_old_cert
  * drop the init_policy_hash parameter from client_rebinding and from
    rebinding_old_prepare
  * remove the now-unused OID constant from ratls/mod.rs

The peer's TDINFO_STRUCT continues to be carried in
EXTNID_MIGTD_TDREPORT_INIT and consumed by
mig_policy::authenticate_rebinding_old.

NB: anti-downgrade binding of the locally-loaded INIT data against the
local MigTD's own TDINFO (verify_init_migtd_data_policy_binding) belongs
in start_rebinding and is tracked separately (GAPS.md T1 / G1).

Signed-off-by: Stanislaw Grams <stanislaw.grams@intel.com>
@sgrams sgrams requested a review from jyao1 as a code owner June 8, 2026 13:09
@sgrams sgrams self-assigned this Jun 8, 2026
@sgrams

sgrams commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

This should be merged only once pull/869 is checked-in AND verify_init_migtd_data_policy_binding is wired into start_rebinding.

@sgrams sgrams changed the title ratls: drop self-referential init_policy_hash cert extension DRAFT: ratls: drop self-referential init_policy_hash cert extension Jun 8, 2026
@sgrams sgrams marked this pull request as draft June 8, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant